﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace EQual.MainModule
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();


            /*
            WpfApplicationExperimental.MainViewPresenter presenter = new WpfApplicationExperimental.MainViewPresenter();
            // WpfApplicationExperimental .OutlookTabControl view 
            MainModule.Documents.Views.DocumentsGridViewControl controlview = new EQual.MainModule.Documents.Views.DocumentsGridViewControl();

            WpfApplicationExperimental.DataGridAdapter view = new WpfApplicationExperimental.DataGridAdapter(gridView.dataGrid1);
            presenter.view = view;
            presenter.ItemsSource = from c in new DataAccesLayer.DocumentDataAccesLayer().GetDocuments() select c as DataAccesLayer.DomainModel.BaseDataAccesObject;
            */
            EQual.MainModule.Employees.Trainings.TrainingsGridView view = new EQual.MainModule.Employees.Trainings.TrainingsGridView();
            view.DataContext = new
            {
                ItemsCollection = new List<DataAccesLayer.Training> 
                { 
                new DataAccesLayer.Training(),
                new DataAccesLayer.Training(),
                new DataAccesLayer.Training() 
                }
            };
            NewMethod(view);
        }

        private void NewMethod(UserControl view)
        {
            this.contentGrid.Children.Add(view);
        }
    }
}
